package com.yf.exam.modules.trainingarchives.evaluation.service.impl;

import com.yf.exam.modules.trainingarchives.evaluation.dto.EvaluationItemTemplateDTO;
import com.yf.exam.modules.trainingarchives.evaluation.entity.EvaluationItem;
import com.yf.exam.modules.trainingarchives.evaluation.entity.EvaluationItemTemplate;
import com.yf.exam.modules.trainingarchives.evaluation.mapper.EvaluationItemTemplateMapper;
import com.yf.exam.modules.trainingarchives.evaluation.service.IEvaluationItemTemplateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yf.exam.modules.user.UserUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 满意度调查项模板表 服务实现类
 * </p>
 *
 * @author lql
 * @since 2025-01-06
 */
@Service
public class EvaluationItemTemplateServiceImpl extends ServiceImpl<EvaluationItemTemplateMapper, EvaluationItemTemplate> implements IEvaluationItemTemplateService {

    @Override
    public void add(EvaluationItemTemplateDTO reqDTO) {
        EvaluationItemTemplate entity = new EvaluationItemTemplate();
        reqDTO.setOrganizationId(UserUtils.getDepartId());
        BeanUtils.copyProperties(reqDTO, entity);
        this.save(entity);
    }
}
